package com.hmall.user.mapper;

import com.hmall.user.pojo.Address;
import com.hmall.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface userMapper {
    // 根据用户id查询地址列表
    @Select("select * from tb_address where user_id = #{userId}")
    List<Address> selectByAddresses(int userId);
    // 根据addressId查询Address
    @Select("select * from tb_address where id = #{addressId}")
    Address selectByAddressesId(int addressId);
}
